package com.car.dal.dao.partjob;

import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.TgPartjob;
import com.car.util.Page;

public class TgParjobDaoImpl extends IbatisCommonDao<TgPartjob, Long> implements TgParjobDao {

	public GridObj GetList(TgPartjob partjob, PageObj pageObj) {
		OrderObj order = new OrderObj();
		order.setDir("asc");
		order.setSort("id");
		// TODO Auto-generated method stub
		return super.findByPage(partjob, pageObj, order);
	}
	
	public Integer getPrajobCountByType(TgPartjob partjob) {
		return this.queryForInteger("getPrajobCountByType", partjob);
	}
	
	public List<TgPartjob> getPrajobByType(TgPartjob partjob,Page page) {
		partjob.setFirstrownum(page.getFirstrownum());
		partjob.setPagesize(page.getPagesize());
		return this.queryForEntityList(TgPartjob.class,"getPrajobByType", partjob);
	}
	
}
